﻿<%@ Page Language="VB" MasterPageFile="~/WebForm/MasterPage.master" AutoEventWireup="false"
    CodeFile="ManageOrganization.aspx.vb" Inherits="WebForm_ManageOrganization" EnableEventValidation="false" %>

<%--<%@ Register Src="~/WebForm/SearchOrganization.ascx" TagName="SearchOrganization"
    TagPrefix="My" %>--%>
<%@ Register Src="~/WebForm/ManageOrganization/AddOrganization.ascx" TagName="AddOrganization"
    TagPrefix="My" %>
<%@ Register Assembly="App_Code" Namespace="My" TagPrefix="My" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table align="center" width="95%">
        <tr>
            <td align="center">
                <asp:Label ID="Title" runat="server" SkinID="title" meta:resourcekey="Page"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" AutoPostBack="false"
                    ActiveTabIndex="0">
                    <ajaxToolkit:TabPanel ID="SearchTabPanel" runat="server" meta:resourcekey="SearchTabPanel">
                        <ContentTemplate>
                            <table>                            
                                <tr>
                                    <td>
                                        <asp:Label ID="lblActive" runat="server" meta:resourcekey="lblActive"></asp:Label>
                                    </td>
                                    <td>    
                                        <asp:DropDownList ID="ddlActive" runat="server" AutoPostBack="false">
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" CommandName="btnQuery" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:UpdatePanel ID="up1" runat="server" UpdateMode="conditional">
                                            <ContentTemplate>
                                                <asp:TreeView ID="trOrganization" runat="server" ImageSet="Simple" ShowLines="true"
                                                    CssClass="tree">
                                                    <Nodes>
                                                        <My:MyTreeNode MyText="Root">
                                                            <%--<My:MyTreeNode Text="<span oncontextmenu='return showmenuie5(event)'>組織1</span>">--%>
                                                            <My:MyTreeNode MyText="組織1">
                                                                <My:MyTreeNode MyText="組織3">
                                                                </My:MyTreeNode>
                                                            </My:MyTreeNode>
                                                            <My:MyTreeNode MyText="組織2">
                                                            </My:MyTreeNode>
                                                        </My:MyTreeNode>
                                                    </Nodes>
                                                    <NodeStyle Font-Size="9pt" />
                                                    
                                                </asp:TreeView>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                        <asp:Panel ID="Panel2" runat="server" BorderColor="Black" CssClass="skin0" onClick="jumptoie5(event)">
                                            <%--                            <div class="menuitems">
                                <asp:LinkButton ID="LinkButton1" runat="server" CssClass="menuitems">New Node  
                                </asp:LinkButton>
                            </div>
                            <div class="menuitems">
                                <asp:LinkButton ID="LinkButton2" runat="server" CssClass="menuitems">Edit Node  
                                </asp:LinkButton>
                            </div>
                            <hr />
                            <div class="menuitems">
                                <asp:LinkButton ID="LinkButton3" runat="server" CssClass="menuitems">Delete Node  
                                </asp:LinkButton>
                            </div>
                            <hr />
                            <div class="menuitems">
                                <asp:LinkButton ID="LinkButton4" runat="server" CssClass="menuitems">FAQS  
                                </asp:LinkButton>
                            </div>
                            <div class="menuitems">
                                <asp:LinkButton ID="LinkButton5" runat="server" CssClass="menuitems">Online Help  
                                </asp:LinkButton>
                            </div>
                            <hr />
                            <div class="menuitems">
                                <asp:LinkButton ID="LinkButton6" runat="server" CssClass="menuitems">Email Me  
                                </asp:LinkButton>
                            </div>--%>
                                            <asp:Menu ID="ContextMenu1" runat="server" Font-Size="9pt" Width="100%">
                                                <StaticItemTemplate>
                                                    <asp:Label ID="lblMenuItem" runat="server" Text='<%# Eval("Text") %>' onclick="if(this.innerText=='停用') return confirm('確定停用?');"></asp:Label>
                                                </StaticItemTemplate>
                                                <Items>
                                                    <asp:MenuItem Value="Add" meta:resourcekey="miAdd"></asp:MenuItem>
                                                    <%--<asp:MenuItem Value="AddInternal" meta:resourcekey="miAddInternal"></asp:MenuItem>--%>
                                                    <asp:MenuItem Value="Edit" meta:resourcekey="miEdit"></asp:MenuItem>
                                                    <asp:MenuItem Value="Disable" meta:resourcekey="miDisable"></asp:MenuItem>
                                                    <asp:MenuItem Value="Cut" meta:resourcekey="miCut"></asp:MenuItem>
                                                    <asp:MenuItem Value="Paste" meta:resourcekey="miPaste"></asp:MenuItem>
                                                </Items>
                                                <StaticHoverStyle BackColor="#9999FF" />
                                            </asp:Menu>
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajaxToolkit:TabPanel>
                    <ajaxToolkit:TabPanel ID="AddTabPanel" runat="server" meta:resourcekey="AddTabPanel">
                        <ContentTemplate>
                            <My:AddOrganization ID="AddOrganization1" runat="server" />
                        </ContentTemplate>
                    </ajaxToolkit:TabPanel>
                </ajaxToolkit:TabContainer>
            </td>
        </tr>
    </table>
    <br />

    <script>
if (ie5||ns6)  
  menuobj=document.getElementById("<%= Me.Panel2.ClientID %>")  ;
  
  //alert(document.onclick);
    </script>

</asp:Content>
